package cli

import (
	"fmt"
	"os"

	"github.com/spf13/cobra"
)

var (
	version string
)

var rootCmd = &cobra.Command{
	Use:   "cloud_station_cli",
	Short: "cloud_station_cli 是一个云服务客户端工具",
	Long:  "cloud_station_cli 是一个云服务客户端工具",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("run cloud_station_cli....")
	},
}

func init() {
	flags := rootCmd.PersistentFlags()
	flags.StringVarP(&version, "version", "v", "v1.0.0", "cloud station 版本信息")
}

func Execute() {
	if err := rootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}
